package com.shop.admin.controller;


import com.shop.admin.service.ChatRoomInferiorService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;


@Api(tags = {"WebSocketController"},description = "聊天接口")
@RestController
@RequestMapping("/api/webSocket")
public class WebSocketController {

    @Resource
    private ChatRoomInferiorService chatRoomInferiorService;

//    @PostMapping("/sentMessage")
//    public void sentMessage(@RequestBody MessageVo messageVo){
//        try {
//            webSocket.sendMessageByUserId(messageVo.getUserId(),messageVo.getMessage());
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }

//    @GetMapping("/message")
//    public ApiResult webSocketMessage(@RequestParam Map<String, Object> params){
//        PageUtils page = chatRoomInferiorService.pageMessage(params);
//        return ApiResult.ok(page);
//    }
}
